
#main {
  padding-bottom: 4rem;
}

footer {
  position: fixed;
  display: flex;
  left: 0;
  bottom: 0;
  width: 100%;
  max-height: 2.5rem;
  min-height: 2.5rem;
  padding: .3rem 0;
  background: #f2f2f2;
  justify-content: space-around;

  &::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, .2);
    transform-origin: 0 0;
    transform: scaleY(.5);
  }

  label {
    input[type='text'] {
      margin: 0;
      border: none;
      background: white;
    }
  }

  button.send {
    border: none;
    background: #d5d5de;
    color: white;
    pointer-events: none;

    &.ok {
      pointer-events: auto;
      background: orange;
    }
    &:active {
      background: orangered;
    }
  }
}

.time {
  text-align: center;
  padding: .5rem 0;
  margin: 0;
}

.avatar {
  max-width: 2rem;
  min-width: 2rem;
  max-height: 2rem;
  min-height: 2rem;
  border-radius: 50%;
  margin: 0 .5rem;
  &.border {
    border: 1px solid #a2a2a8;
  }
}

.msg-container {
  display: flex;
  position: relative;
}

.msg-box {
  position: relative;
  border-radius: 10px;
  background: white;
  flex-grow: 1;
  font-size: 16px;
  padding: .5rem;
  word-wrap: break-word;
  overflow: hidden;
}

.triangle() {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
}

.other {
  margin-right: 3rem;
  .img-container {
    &::after {
      .triangle();
      top: .5rem;
      transform: translateX(-50%) rotate(45deg);
      background-color: #f1d4be;
    }
  }
}

.own {
  justify-content: flex-end;
  margin-left: 3rem;
  .img-container {
    position: relative;
    &::after {
      .triangle();
      left: -.5rem;
      top: .5rem;
      transform: translateX(50%) rotate(45deg);
      background-color: #c8e8de;
    }
  }
}

.msg-box-left {
  background-color: #c8e8de;
}

.msg-box-right {
  background-color: #f1d4be;
}